package com.singzi.leetcode.jianzhiOffer;

import java.util.HashSet;

public class T0003 {
}
class Solution0003 {
    public int findRepeatNumber(int[] nums) {

        HashSet hashSet = new HashSet();
        for(Integer num:nums){
            if(hashSet.contains(num)) return num;
            else hashSet.add(num);
        }
        return -1;

    }
}